<?php 
namespace Common\Model;
use Think\Model\RelationModel;
class LessonRecordModel extends RelationModel{
	protected $_link = array(
			'user'=>array(
					'mapping_type'=>self::BELONGS_TO,
					'class_name'  =>'Users',
					'foreign_key'=>'uid',
					//'as_fields'=>'title:district',
			),
			'original_term'=>array(
					'mapping_type'=>self::BELONGS_TO,
					'class_name'  =>'YgclTerm',
					'foreign_key'=>'original_tid',
					//'as_fields'=>'title:district',
			),
			'next_term'=>array(
					'mapping_type'=>self::BELONGS_TO,
					'class_name'  =>'YgclTerm',
					'foreign_key'=>'next_tid',
					//'as_fields'=>'title:district',
			),
			'original_lesson'=>array(
					'mapping_type'=>self::BELONGS_TO,
					'class_name'  =>'YgclLesson',
					'foreign_key'=>'original_lid',
					//'as_fields'=>'title:district',
			),
			'next_lesson'=>array(
					'mapping_type'=>self::BELONGS_TO,
					'class_name'  =>'YgclLesson',
					'foreign_key'=>'next_lid',
					//'as_fields'=>'title:district',
			),
	);
}
?>